home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Software Vault: The Gold Collection
/
Software Vault - The Gold Collection (American Databankers) (1993).ISO
/
cdr50
/
idpds10.zip
/
IDOOR.DOC
< prev
next >
Wrap
Text File
|
1993-04-09
|
46KB
|
1,396 lines
INSTA-DOOR(TM)
A door development library for QUICKBASIC, BASIC PDS, and
VISUAL BASIC for DOS
Version 1.0
(C) Copyright 1993 M&J Alliance Software
ALL RIGHTS RESERVED
4/10/93
For the latest version of this program, call our support
BBS: (602) 937-3796 (AZ). Or write to:
M&J Alliance Software
P.O. Box 86934
Phoenix, AZ 85080-6934
INSTA-DOOR v1.0 TABLE OF CONTENTS i
TABLE OF CONTENTS
WARRANTY ................................................ 1
TRADEMARK ............................................... 1
REGISTRATION POLICY ..................................... 2
SYSTEM REQUIREMENTS ..................................... 2
PURPOSE ................................................. 3
FILES INCLUDED IN ARCHIVE ............................... 4
LICENSE ................................................. 4
USING INSTA-DOOR ........................................ 5
SETTING UP THE DOOR WITH THE BBS ........................ 7
INSTA-DOOR ROUTINES
ANSIMusic ............................................. 8
Backspace ............................................. 8
ChangeColor ........................................... 9
ChangePos ............................................. 9
CheckTermulation ...................................... 9
ClearWindow .......................................... 10
ClearLine ............................................ 10
CursorDown ........................................... 10
CursorLeft ........................................... 10
CursorRight .......................................... 11
CursorUp ............................................. 11
DialogBox ............................................ 12
EnterKey ............................................. 14
Exist ................................................ 14
Exitdoor ............................................. 14
GetANSIScreen ........................................ 15
Initialize ........................................... 15
IsAlpha .............................................. 15
HitKey ............................................... 16
InputData ............................................ 16
LineFeed ............................................. 17
MakeWindow ........................................... 17
Max .................................................. 18
Min .................................................. 18
OpenAppend ........................................... 18
OpenBinary ........................................... 19
OpenInput ............................................ 19
INSTA-DOOR v1.0 TABLE OF CONTENTS ii
OpenOutput ........................................... 20
PutANSIScreen ........................................ 20
RestoreCursor ........................................ 21
RInstr ............................................... 22
SaveCursor ........................................... 22
SendANSI ............................................. 23
SendAVATAR ........................................... 23
SendCode ............................................. 23
SendPlainLine ........................................ 24
SendText ............................................. 24
SetArraySize ......................................... 25
SetBlink ............................................. 25
SortSt ............................................... 25
Timer2 ............................................... 26
INSTA-DOOR COMMON SHARED VARIABLES ..................... 27
APPENDIX A - COLOR CODES ............................... 28
APPENDIX B - DOOR FILE FORMATS ......................... 29
APPENDIX C - SPLIT SCREEN CHAT AND STATUS BAR .......... 34
INSTA-DOOR v1.0 WARRANTY 1
WARRANTY
This program is provided "AS IS" without any warranty,
expressed or implied. Any person using this software
assumes the risk involved in doing so. Also, no
warranty exists for the fitness of programs developed
with this software. Finally, the author cannot assume
responsibility for any hardware damage caused by the
proper or improper use of this program.
TRADEMARK
INSTA-DOOR(TM) is a trademark of M&J Alliance Software.
INSTA-DOOR v1.0 REGISTRATION POLICY 2
REGISTRATION POLICY
INSTA-DOOR is a SHAREWARE product. This means that
this program may be evaluated for a brief trial period,
in this case 15 DAYS. After this time expires, YOU
MUST REGISTER THIS SOFTWARE if you plan to continue
using it (for either commercial or non-commercial
purposes). The REGISTRATION FEE is $20.00 U.S.
See ORDER.FRM for details.
SYSTEM REQUIREMENTS
INSTA-DOOR requires QuickBasic v4.0 and up, BASIC
PDS v7.1, or VISUAL BASIC for DOS v1.0. DOS 3.0
or higher is required for file sharing
(multi-node operation).
INSTA-DOOR v1.0 PURPOSE 3
PURPOSE
INSTA-DOOR is a collection of routines intended to aid
the BASIC programmer in the development of BBS DOOR
programs. Many programming details are taken care of
automatically by INSTA-DOOR, such as Communications
setup, BBS support, etc. Features of this library include:
-Support for many BBS FORMATS: DORINFOx.DEF
(RBBS, QBBS), DOOR.SYS, CALLINFO.BBS (Wildcat!),
CHAIN.TXT (WWIV), and PCBOARD.SYS (PCBoard 14.x)
-Interrupt driven I/O with support for COM 1-4. Baud
rates up to 115,200 possible.
-An ANSI/AVATAR 0,0+ driver built in! No need for
ANSI.SYS
-Split screen chat built into the door (done
automatically, see APPENDIX C for directions on
how to operate)
-Status bar (describing current status of user) on
the bottom (taken care of automatically, see
APPENDIX C for directions on how to change user
settings)
-A Dialog Box that works with arrow keys (or numeric
keypad).
-Automatic REMOTE TERMINAL detection
-ANSI Music
-Complete control of the cursor with commands like
'Cursor Left', 'ChangePos', etc.
-Getting and Restoring areas of the screen, both
LOCALLY and REMOTELY!
-Advanced inputting routine
-COLOR CODES to change colors 'on the fly' (See
APPENDIX A)
INSTA-DOOR v1.0 FILES 4
FILES
These files can be found in the IDOOR archive:
IDOORQB.LIB (IDOORPDS.LIB, IDOORVB.LIB) Library file
IDOORQB.QLB (IDOORPDS.QLB, IDOORVB.QLB) Library file
IDOOR.BAS A DOOR demo
IDOOR.EXE The demo compiled (PKLITED)
GENINFO.ANS An ANSI file to use with the demo
GENINFO.AVT An AVATAR file to use with the demo
IDOOR.CFG Configuration file to use with demo
IDOOR.DOC Documentation file (this file)
ORDER.FRM Details about program REGISTRATION
IDOORDEM.DOC How to run the IDOOR demo
IDOOR.BI Include file
FILE_ID.DIZ Description file
LICENSE
INSTA-DOOR may be freely distributed via Bulletin
Board Networks or other Shareware vendors provided
that all above files are included and not altered in any
way.
INSTA-DOOR v1.0 USING INSTA-DOOR 5
USING INSTA-DOOR
Both the .LIB and .QLB forms of the library have been
included, however if you wish to make the .QLB library
from the .LIB library (the reverse is not possible), use
the LINK program that comes with the compiler. Type:
LINK /Q IDOORQB.LIB,,NUL,BQLB45; for QB users
LINK /Q IDOORPDS.LIB,,NUL,QBXQLB; for PDS users
LINK /Q IDOORVB.LIB,,NUL,VBDOSQLB; for VBDOS users
You must load the .QLB library into memory when running
the compiler in order to program in the environment. Do it
like this:
QB (programname) /L IDOORQB for QB users
QBX (programname) /L IDOORPDS for PDS users
VBDOS (programname) /L IDOORVB for VBDOS users
You must INCLUDE the IDOOR.BI file in your program,
preferably at the beginning of the code. This file
contains declarations for all SUBs and FUNCTIONs, as well
as some global variables used by the library. This is
done as follows:
REM $INCLUDE: 'IDOOR.BI'
Once the IDOOR.BI file has been included, it is not necessary
to use the CALL keyword when using a INSTA-DOOR routine,
we recommend that you do not do so. To use an INSTA-DOOR
routine in your program, simply use the name of the
routine, followed by appropriate arguments if needed.
Here are some examples:
ChangePos 12, 37
k$ = Hitkey$
Initialize
ChangeColor foreground%, background%
If you wish to compile your DOOR program from the command
line, do it like this:
BC programname /O; for QB, VBDOS users
BC programname /O /FS; for PDS users
If you are using PDS, you MUST compile your program using
FAR STRINGS (/FS switch). VBDOS uses far strings by
default. Of course, you may added any additional switches
that are necessary to compile your program.
INSTA-DOOR v1.0 USING INSTA-DOOR 6
You must then use LINK to get your program into the final
.EXE form:
LINK /EX /NOE programname,,NUL,IDOORQB; for QB users
LINK /EX /NOE programname,,NUL,IDOORPDS; for PDS users
LINK /EX /NOE programname,,NUL,IDOORVB; for VB users
Again, you may use any switches that are necessary for
your program.
INSTA-DOOR v1.0 SETTING UP THE DOOR WITH THE BBS 7
SETTING UP THE DOOR WITH THE BBS
The SYSOP of the BBS customizes the DOOR by editing the
configuration file. The name of this file is chosen by
the SYSOP (usually ending with a .CFG). This file lets
the SYSOP customize the DOOR for his/her BBS. The format
of this file is as follows (each line is straight
ASCII text ending with CR-LF's):
1. BBS Name
2. Sysop Name
3. Door Directory (Example: "C:\BBS\DOORS\", must end
with backslash)
4. Door Type
1 = DORINFOx.DEF (x= Node number)
2 = DOOR.SYS
3 = CALLINFO.BBS
4 = CHAIN.TXT
5 = PCBOARD.SYS
5. Status Bar foreground color
6. Status Bar background color
7. Split Screen Chat border foreground color
8. Split Screen Chat border background color
9. Split Screen Chat highlight foreground color
10. Split Screen Chat highlight background color
11. Split Screen Chat text foreground color
12. Split Screen Chat text background color
13. Node number (make sure it matches DORINFOx.DEF
if it is being used)
The SYSOP runs the door by specifying the configuration
file on the command line, for example:
IDOOR IDOOR.CFG (runs the demo)
The DOOR can usually be run in LOCAL mode (with no comm
ports open). Do it by specifying the word 'LOCAL' on the
command line:
IDOOR IDOOR.CFG LOCAL
INSTA-DOOR v1.0 INSTA-DOOR ROUTINES 8
INSTA-DOOR ROUTINES
SEE THE 'INITIALIZE' and 'EXITDOOR' routines! These
commands MUST BE USED IN ALL DOOR PROGRAMS!
The INSTA-DOOR routines are organized as follows:
Name: Name of routine
Type: SUB or FUNCTION
Comp: Is this command compatible with TEXT, ANSI,
or AVATAR displays?
Usage: Shows the correct syntax in using the command
Name: ANSIMusic
Type: SUB
Comp: ANSI
Lets you play ANSI music in your DOOR program. It
is essentially the same as the BASIC PLAY statement,
except that the music is sent to the remote location as
well. Use the same commands as you would for the PLAY
statement. Not all terminal programs allow the use of
ANSI music, it is best to let the user turn this feature
off in your programs, if desired.
Usage: ANSIMusic musicst$
musicst$ = Musical commands
Name: Backspace
Type: SUB
Comp: TEXT, ANSI, AVATAR
Moves the cursor one column to the left, erasing any
characters at the new cursor position. If the cursor is
on column 1, nothing happens (no wrapping).
Usage: Backspace num%
num% = Number of times to backspace
INSTA-DOOR v1.0 INSTA-DOOR ROUTINES 9
Name: ChangeColor
Type: SUB
Comp: ANSI, AVATAR
Changes the foreground and background colors.
Usage: ChangeColor fore%, back%
fore% = new foreground color (0-15, defined the
same as the BASIC COLOR statement)
back% = new background color (0-7)
Name: ChangePos
Type: SUB
Comp: ANSI, AVATAR
Changes the cursor position. Row = 1, column = 1
represents the upper left corner of the screen, while
row = 23, column = 80 is the lower right corner.
Usage: ChangePos rownew%, colnew%
rownew% = Cursor row position
colnew% = Cursor column position
Name: CheckTermulation%
Type: FUNCTION
Comp: TEXT, ANSI, AVATAR
Returns a value depending on the remote terminal in
use. 0 = No terminal detected (ASCII, TTY, etc.).
1 = ANSI detected, 2 = AVATAR detected. This will work
ONLY if the remote terminal will respond to a terminal
detection code sent by this routine, not all terminals
support this capability (although most do).
Usage: terminal% = CheckTermulation%
INSTA-DOOR v1.0 INSTA-DOOR ROUTINES 10
Name: ClearLine
Type: SUB
Comp: ANSI, AVATAR
Clears the row from the current cursor position to the
end of the line (column 80).
Usage: ClearLine
Name: ClearWindow
Type: SUB
Comp: ANSI, AVATAR
Clears the screen (but not the status bar at the
bottom). The cursor is reset to row = 1, column = 1.
Usage: ClearWindow
Name: CursorDown
Type: SUB
Comp: ANSI, AVATAR
Moves the cursor one row down. The movement is non-
destructive, meaning no characters are erased. If the
cursor is on row 23, then the position is not changed.
Usage: CursorDown nooftimes%
nooftimes% = Number of times to move the cursor
Name: CursorLeft
Type: SUB
Comp: ANSI, AVATAR
Moves the cursor one column to the left. The movement
is non-destructive, meaning no characters are erased.
If the cursor is on column 1, then the position is not
changed.
Usage: CursorLeft nooftimes%
nooftimes% = Number of times to move the cursor
INSTA-DOOR v1.0 INSTA-DOOR ROUTINES 11
Name: CursorRight
Type: SUB
Comp: ANSI, AVATAR
Moves the cursor one column to the right. The
movement is non-destructive, meaning no characters are
erased. If the cursor is on column 80, then the position
is not changed.
Usage: CursorRight nooftimes%
nooftimes% = Number of times to move the cursor
Name: CursorUp
Type: SUB
Comp: ANSI, AVATAR
Moves the cursor one row up. The movement is non-
destructive, meaning no characters are erased. If the
cursor is on row 1, then the position is not changed.
Usage: CursorUp nooftimes%
nooftimes% = Number of times to move the cursor
INSTA-DOOR v1.0 INSTA-DOOR ROUTINES 12
Name: DialogBox%
Type: FUNCTION
Comp: ANSI, AVATAR
This is a fully-definable scrollable Dialog Box for use
with DOOR programs. You can define the size of the box,
the number of choices in the box, the colors of the box,
etc. A list of choices is passed as a STRING array to the
routine, and the selected choice is returned as an
integer. If the SORT variable is set, the list will be sorted
in the box. If the HOTKEY variable is set, you can press
the first letter of a choice (A-Z only) to select it. A
choice is made with ENTER, but you can escape out of the
Dialog Box without choosing anything by pressing ESC.
If no choice is made, -1 will be returned. You can prevent
the user from escaping by setting the ESCAPE variable
accordingly. Moving the selection bar can be done with the
arrow keys (with most terminals), as well as the numeric
keypad 'equivalents', 2, 4, 6 and 8. Also, HOME('7'),
END('1'), PAGE UP('9'), and PAGE DOWN('3') will work.
However, the PAGE UP and PAGE DOWN keys will not work for
the REMOTE operator, since these keys are usually reserved
for uploading and downloading. With some terminals,
extended keys will not work correctly until the keyboard
macro file is edited so that the program sends the
appropriate codes. Here's what the codes should be:
ESC[A = ^[[A = Up arrow
ESC[B = ^[[B = Down arrow
ESC[C = ^[[C = Right arrow
ESC[D = ^[[D = Left Arrow
ESC[H = ^[[H = Home
ESC[K = ^[[K = End
You should probably make this information known to the user
of your door.
INSTA-DOOR v1.0 INSTA-DOOR ROUTINES 13
Usage: ch% = DialogBox% (list$(), row%, col%, boxlength%,
boxwidth%, sort$, hotkey$, escape$, bordertype%,
topfcolor%, bottomfcolor%, bground%, textcolor%)
list$() = Choices to use in the box
row% = row location of box (upper-left corner)
col% = column location of box (upper-left corner)
boxlength% = number of entries to display at one
time in the box
boxwidth% = width of the box
sort$ = "Y" if you wish to sort the list, "N" if
not
hotkey$ = "Y" to type first letter of choice, "N"
if not
escape$ = "Y" to allow ESC to be used, "N" if not
bordertype% = 1 for '3D' border, 2 for singleline
3 for doubleline
topfcolor% = color of the top border of the box
bottomfcolor% = color of the bottom border
bground% = color of the box background (0-7)
textcolor% = color of the text in the box
INSTA-DOOR v1.0 INSTA-DOOR ROUTINES 14
Name: EnterKey
Type: SUB
Comp: ANSI, AVATAR
Displays a text string at a specified location on the
screen, and waits for ENTER to be pressed. Color codes
can be used with this command (See APPENDIX A).
Usage: EnterKey st$, fore%, back%, row%, col%
st$ = String to display
fore% = Foreground color of text
back% = Background color of text
row% = Row location of string
col% = Column location of string
Name: Exist%
Type: FUNCTION
Comp: TEXT, ANSI, AVATAR
Returns TRUE (-1) if the passed path + filename
exists, else FALSE (0).
Usage: ch% = Exist% (filename$)
filename$ = Filename to test
Name: ExitDoor
Type: SUB
Comp: TEXT, ANSI, AVATAR
Use this command before exiting the program. It
closes the COM PORT, and re-saves new information to
the DOOR INFO file. USE THIS COMMAND BEFORE EXITING THE
DOOR PROGRAM!
Usage: ExitDoor
INSTA-DOOR v1.0 INSTA-DOOR ROUTINES 15
Name: GetANSIScreen
Type: SUB
Comp: ANSI, AVATAR
Saves a portion of the screen to an array, where it
can be restored with PutANSIScreen. To calculate the
size of the integer array needed to use this command, use
the command SetArraySize.
Usage: GetANSIScreen (array%(), row1%, col1%, row2%, col2%)
array%() = Integer array used to store screen area
row1% = Upper row of screen area
col1% = Leftmost column of screen area
row2% = Lower row of screen area
col2% = Rightmost column of screen area
Name: Initialize
Type: SUB
Comp: TEXT, ANSI, AVATAR
This command MUST BE THE FIRST COMMAND USED in any
DOOR program. The COM routines are initialized, the DOOR
INFO files are loaded, the DOOR CONFIGURATION FILE is
loaded, and the ANSI/AVATAR driver is initialized.
Usage: Initialize
Name: IsAlpha%
Type: FUNCTION
Comp: TEXT, ANSI, AVATAR
Returns TRUE (-1) if the passed character is a letter
of the alphabet, either upper or lower case, else FALSE
(0).
Usage: ch% = IsAlpha% (char$)
char$ = Character to test
INSTA-DOOR v1.0 INSTA-DOOR ROUTINES 16
Name: HitKey$
Type: FUNCTION
Comp: TEXT, ANSI, AVATAR
This command is similar in function to INKEY$, except
that both remote and local keystrokes are detected. You
can determine whether the keystroke was remote or local
by reading the passed variable, 0 = LOCAL, -1 = REMOTE.
Usage: k$ = Hitkey$ (localorremote%)
localorremote% = -1 if key came from REMOTE
0 if key came from LOCAL
Name: InputData$
Type: FUNCTION
Comp: ANSI, AVATAR
This command gets input from the user. The length of
input may be defined, as well as the colors of the input
field. Also, a pre-defined answer may be sent to the
routine, which the user may choose or not choose to accept.
If the MASK variable is set, typing will echo back only the
mask'ed character. If the input length is one, and the
HOTKEY variable is set, then it is not necessary to press
return after typing.
Usage: i$ = InputData$ (allowed%, forecolor%, backcolor%,
temp$, mask$, hotkey$)
allowed% = input length
forecolor% = foreground color of input field
backcolor% = background color of input field
temp$ = pre-defined answer (optional)
mask$ = mask character (optional)
hotkey$ = "Y" if hotkeys are desired, "N" if not
INSTA-DOOR v1.0 INSTA-DOOR ROUTINES 17
Name: Linefeed
Type: SUB
Comp: TEXT, ANSI, AVATAR
Sends a specified number of carriage return-linefeeds
(CR-LF = CHR$(13) + CHR$(10)) to the LOCAL and REMOTE
consoles.
Usage: Linefeed num%
num% = Number of CR-LF's to send
Name: MakeWindow
Type: SUB
Comp: ANSI, AVATAR
As you might expect, this sub creates windows. You
can specify the colors of the window, the header text, the
border type, and the window location.
Usage: MakeWindow row1%, col1%, row2%, col2%, topheader$,
bottomheader$, bordertype%, topfcolor%,
bottomfcolor%, bground%, headercolor%
row1% = Top row of window
col1% = Leftmost column of window
row2% = Bottom row of window
col2% = Rightmost column of window
topheader$ = Text to appear on top border
bottomheader$ = Text to appear on bottom border
bordertype% = 1 for '3D' border, 2 for singleline
3 for doubleline
topfcolor% = color of the top border of the window
bottomfcolor% = color of the bottom border
bground% = color of the box background (0-7)
headercolor% = color of the text headers
INSTA-DOOR v1.0 INSTA-DOOR ROUTINES 18
Name: Max%
Type: FUNCTION
Comp: TEXT, ANSI, AVATAR
Returns the larger of the two integers passed to it.
Usage: ch% = Max% (first%, second%)
first% = An integer to test
second% = An integer to test
Name: Min%
Type: FUNCTION
Comp: TEXT, ANSI, AVATAR
Returns the smaller of the two integers passed to it.
Usage: ch% = Min% (first%, second%)
first% = An integer to test
second% = An integer to test
Name: OpenAppend%
Type: FUNCTION
Comp: TEXT, ANSI, AVATAR
Opens a file for access (APPEND mode). Only writing
to the file is possible. The file is opened with SHARED
access, so that multi-node operation is possible. It will
be necessary to install the DOS SHARE utility if your DOS
version if 4.0 or less, if you want multi-node capability.
A free file handle is returned. Normal BASIC commands can
be used to do other file operations (GET, PUT, SEEK, CLOSE
etc.). An example of this would be:
GET #filehandle, 1, var$
Usage: filehandle% = OpenAppend% (filename$)
filename$ = file to open
INSTA-DOOR v1.0 INSTA-DOOR ROUTINES 19
Name: OpenBinary%
Type: FUNCTION
Comp: TEXT, ANSI, AVATAR
Opens a file for access (BINARY mode). Reading and
writing to the file is possible. The file is opened
with SHARED access, so that multi-node operation is
possible. It will be necessary to install the DOS
SHARE utility if your DOS version if 4.0 or less, if
you want multi-node capability. A free file handle is
returned. Normal BASIC commands can be used to do other
file operations (GET, PUT, SEEK, CLOSE etc.). An example
of this would be:
GET #filehandle, 1, var$
Usage: filehandle% = OpenBinary% (filename$)
filename$ = file to open
Name: OpenInput%
Type: FUNCTION
Comp: TEXT, ANSI, AVATAR
Opens a file for access (INPUT mode). Only reading
from the file is possible. The file is opened with SHARED
access, so that multi-node operation is possible. It will
be necessary to install the DOS SHARE utility if your DOS
version if 4.0 or less, if you want multi-node capability.
A free file handle is returned. Normal BASIC commands can
be used to do other file operations (GET, PUT, SEEK,
CLOSE etc.). An example of this would be:
GET #filehandle, 1, var$
Usage: filehandle% = OpenInput% (filename$)
filename$ = file to open
INSTA-DOOR v1.0 INSTA-DOOR ROUTINES 20
Name: OpenOutput%
Type: FUNCTION
Comp: TEXT, ANSI, AVATAR
Opens a file for access (OUTPUT mode). Only writing
to the file is possible. The file is opened with SHARED
access, so that multi-node operation is possible. It will
be necessary to install the DOS SHARE utility if your DOS
version if 4.0 or less, if you want multi-node capability.
A free file handle is returned. Normal BASIC commands can
be used to do other file operations (GET, PUT, SEEK,
CLOSE etc.). An example of this would be:
GET #filehandle, 1, var$
Usage: filehandle% = OpenOutput% (filename$)
filename$ = file to open
Name: PutANSIScreen
Type: SUB
Comp: ANSI, AVATAR
Restores an area of the screen previously saved with
GetANSIScreen. The REMOTE screen is restored as well as
the LOCAL screen. A 'fast' mode is included that restores
screens where the background color doesn't change.
Usage: PutANSIScreen array%(), row1%, col1%, row2%,
col2%, fast$
array%() = Integer array used to store screen area
with GetANSIScreen
row1% = Upper row of screen area
col1% = Leftmost column of screen area
row2% = Lower row of screen area
col2% = Rightmost column of screen area
fast$ = "Y" for 'fast' mode (no changing background
colors) or "N" for 'slow' mode
INSTA-DOOR v1.0 INSTA-DOOR ROUTINES 21
Name: RestoreCursor
Type: SUB
Comp: ANSI, AVATAR
Restores the cursor position saved by SaveCursor.
Usage: RestoreCursor
Name: Rinstr
Type: SUB
Comp: TEXT, ANSI, AVATAR
Works similarly to BASIC's INSTR command, except that
strings are searched starting at the end instead of the
beginning.
Usage: Rinstr search$, char$, found%
search$ = String to search
char$ = String to look for
found% = 0 if not found, else position in string
Name: SaveCursor
Type: SUB
Comp: ANSI, AVATAR
Saves the current position of the cursor. The cursor
can be restored using RestoreCursor.
Usage: SaveCursor
INSTA-DOOR v1.0 INSTA-DOOR ROUTINES 22
Name: SendAnsi%
Type: FUNCTION
Comp: ANSI
Displays an ANSI file on the screen. If the specified
file does not exist, -1 is returned.
Usage: ch% = SendAnsi% (filename$)
filename$ = Name of ANSI file to display
(no need to specify extension,
.ANS is assumed)
Name: SendAvatar%
Type: FUNCTION
Comp: AVATAR
Displays an AVATAR file on the screen. If the
specified file does not exist, -1 is returned.
Usage: ch% = SendAvatar% (filename$)
filename$ = Name of AVATAR file to display
(no need to specify extension,
.AVT is assumed)
Name: SendCode
Type: SUB
Comp: ANSI, AVATAR
Displays a text string at the current cursor position.
The string displays on the REMOTE as well as the LOCAL
screen. Color codes can be used with this command
(See APPENDIX A).
Usage: SendCode st$
st$ = String to display
INSTA-DOOR v1.0 INSTA-DOOR ROUTINES 23
Name: SendColorLine
Type: SUB
Comp: ANSI, AVATAR
Sends a text display to the LOCAL and REMOTE displays.
Color codes can be used with this command (See APPENDIX
A). The color of the text is specified, as well as the
location of the text on the screen.
Usage: SendColorLine row%, col%, text$, fore%, back%
row% = Row location of text on the screen
col% = Column location of text on the screen
text$ = Text to display
fore% = Foreground color of text (0-15)
back% = Background color of text (0-7)
Name: SendLongString
Type: SUB
Comp: TEXT, ANSI, AVATAR
Displays a string composed of a repeating single char,
like "XXXXXXXX" or STRING$(70,32). This type of string
displays much faster in AVATAR than ANSI or TEXT, since
AVATAR supports a command to display long strings.
Usage: SendLongString st$
st$ = Long string to display
Name: SendPlainCode
Type: SUB
Comp: TEXT, ANSI, AVATAR
Displays a text string in a similar manner to
SendCode, but color codes cannot be used.
Usage: SendPlainCode st$
st$ = String to display
INSTA-DOOR v1.0 INSTA-DOOR ROUTINES 24
Name: SendPlainLine
Type: SUB
Comp: TEXT, ANSI, AVATAR
Displays a text string in a similar manner to
SendColorLine, but color codes cannot be used.
Usage: SendPlainLine row%, col%, text$, fore%, back%
row% = Row location of text on the screen
col% = Column location of text on the screen
text$ = Text to display
fore% = Foreground color of text (0-15)
back% = Background color of text (0-7)
Name: SendText%
Type: FUNCTION
Comp: TEXT, ANSI, AVATAR
Displays a normal text file on the screen. Control
codes (CR-LF, Backspace, etc.) will still work,
instead of displaying as an ASCII code. If the
specified file does not exist, -1 is returned.
Usage: ch% = SendText% (filename$)
filename$ = Name of TEXT file to display
(specify extension, since there is
no default for a text file)
INSTA-DOOR v1.0 INSTA-DOOR ROUTINES 25
Name: SetArraySize%
Type: FUNCTION
Comp: TEXT, ANSI, AVATAR
This is used to calculate the size of an array to use
with GetANSIScreen. A -1 is returned if an illegal row
or column value is passed.
Usage: size% = SetArraySize% (row1%, col1%, row2%, col2%)
row1% = Upper row of screen area
col1% = Leftmost column of screen area
row2% = Lower row of screen area
col2% = Rightmost column of screen area
Name: SetBlink
Type: SUB
Comp: ANSI, AVATAR
Causes all subsequently displayed text to blink.
Blinking can be turned off by issuing a new ChangeColor
command.
Usage: SetBlink
Name: SortSt
Type: SUB
Comp: TEXT, ANSI, AVATAR
This sub sorts a string array in ASCII order.
Usage: SortSt array$()
array$() = String array to sort
INSTA-DOOR v1.0 INSTA-DOOR ROUTINES 26
Name: Timer2!
Type: FUNCTION
Comp: TEXT, ANSI, AVATAR
This is a replacement for the BASIC TIMER function,
that seems to function better under certain multitasking
environments such as DesqView.
Usage: t! = Timer2!
INSTA-DOOR v1.0 COMMON SHARED VARIABLES 27
INSTA-DOOR COMMON SHARED VARIABLES
INSTA-DOOR takes the most commonly used information
provided by the BBS (through DOOR INFO files) and assigns
them to common shared variables that the programmer can
use. The makers of this library have taken a slightly
different approach in the assigning of these common shared
variables (compared to other door libraries), in that we
provide them ONLY for the most commonly used pieces of
information. The programmer will still have access to ALL
information by examining the dinfo$() array, which contains
each line of the DOOR INFO file (DORINFOx.DEF, DOOR.SYS,
CALLINFO.BBS, etc.). This approach was used to keep the
library size small, instead of including >100 common shared
variables. See APPENDIX B for descriptions of all DOOR
INFO formats supported by this library.
BBSName$ Name of the BBS *
SysopName$ The Sysop's name (first and last) *
port% Active port (0-4, 0 means LOCAL
mode) *
DisplayType% Display being used: 0 for TEXT,
1 for ANSI, 2 for AVATAR
UserLocation$ City and State of the User's
residence *
Baudrate$ Baudrate of current connection *
UserName$ The User's name (first and last) *
timeleft% The time left to the user inside the
DOOR
securitylevel& The user's security level
XPos%, YPos% The current cursor location on the
screen (LOCAL and REMOTE)
SysopScrollColor% status bar attribute
SysopPromptColor% split screen chat borders attribute
SysopHighColor% split screen chat hilite attribute
SysopTextColor% split screen chat text attribute
Node% Active node *
DoorType% 1 = DORINFOx.DEF, 2 = DOOR.SYS,
3 = CALLINFO.BBS, 4 = CHAIN.TXT
5 = PCBOARD.SYS 14.x
DoorDirectory$ Path of door info file (Example:
C:\DOOR\DORINFO1.DEF) *
dinfo$() String array containing the EXACT info
from a DOOR INFO file
(* = These variables ARE NOT MEANT TO BE ALTERED! Doing
so will cause unpredictable results.)
INSTA-DOOR v1.0 APPENDIX A- COLOR CODES 28
APPENDIX A - COLOR CODES
Certain commands that display text in this library
allow changing of colors on the fly using COLOR CODES.
A COLOR CODE is a pipe symbol ('|') followed by a letter
corresponding to a specific color to change to:
b = BLUE, g = GREEN, c = CYAN, r = RED, m = MAGENTA
y = BROWN, w = LIGHT GREY, L = DARK GREY,
B = LIGHT BLUE, G = LIGHT GREEN, C = LIGHT CYAN,
R = LIGHT RED, M = LIGHT MAGENTA, Y = YELLOW,
W = WHITE
Changing colors with color codes is more convenient then
using 'ChangeColor' commands everywhere in a program.
However, changing colors in this way does not allow you
to change the background color, it remains constant. One
good reason to support color codes in your DOOR is that it
allows the USER to change colors (of text input, for
instance). See the DEMO for a example of color codes in
use.
INSTA-DOOR v1.0 APPENDIX B - DOOR FILE FORMATS 29
APPENDIX B - DOOR FILE FORMATS
Each line of the description corresponds to an array
element in dinfo$():
DORINFOx.DEF (x = NODE)
-----------------------
1. BBS name
2. Sysop's first name
3. Sysop's last name
4. COM port (COM0 if Local)
5. Baud and parameters (e.g. 2400 BAUD,N,8,1)
6. Network type.
7. Caller's first name (or SYSOP)
8. Caller's last name (blank if SYSOP)
9. Caller's city and state.
10. Color mode. 0 = non-color, 1 = color mode.
11. Caller's security level.
12. Caller's time remaining.
INSTA-DOOR v1.0 APPENDIX B - DOOR FILE FORMATS 30
DOOR.SYS
--------
1. Comm Port - COM0: = LOCAL MODE
2. Baud Rate
3. Parity - 7 or 8
4. Node Number - 1 to 99 (Default to 1)
5. DTE Rate. Actual BPS rate to use.
6. Screen Display - Y=On N=Off (Default to Y)
7. Printer Toggle - Y=On N=Off (Default to Y)
8. Page Bell - Y=On N=Off (Default to Y)
9. Caller Alarm - Y=On N=Off (Default to Y)
10. User Full Name (First and Last)
11. Calling From (City, State)
12. Home Phone
13. Work/Data Phone
14. Password
15. Security Level
16. Total Times On the BBS
17. Last Date Called
18. Seconds Remaining THIS call (for those that particular)
19. Minutes Remaining THIS call
20. Graphics Mode - GR=Graph, NG=Non-Graph, 7E=7,E Caller
21. Page Length
22. User Mode - Y = Expert, N = Novice
23. Conferences/Forums Registered In (ABCDEFG)
24. Conference Exited To DOOR From (G)
25. User Expiration Date (mm/dd/yy)
26. User File's Record Number
27. Default Protocol - X, C, Y, G, I, N, Etc.
28. Total Uploads
29. Total Downloads
30. Daily Download "K" Total
31. Daily Download Max. "K" Limit
32. Caller's Birthdate
33. Path to the MAIN directory (where User File is)
34. Path to the GEN directory
35. Sysop's Name (name BBS refers to Sysop as)
36. Alias name
37. Event time
38. If its an error correcting connection (Y/N)
39. ANSI supported & caller using NG mode (Y/N)
40. Use Record Locking (Y/N)
41. BBS Default Color (Standard IBM color code, ie, 1-15)
42. Time Credits In Minutes (positive/negative)
43. Last New Files Scan Date (mm/dd/yy)
44. Time of This Call (hh:mm)
45. Time of Last Call (hh:mm)
46. Maximum daily files available
47. Files d/led so far today
48. Total "K" Bytes Uploaded
49. Total "K" Bytes Downloaded
50. User Comment
51. Total Doors Opened
52. Total Messages Left
INSTA-DOOR v1.0 APPENDIX B - DOOR FILE FORMATS 31
CALLINFO.BBS
------------
1. Caller's full name
2. Caller's baud rate
3. City and state
4. Security level
5. Time remaining in minutes
6. Display (COLOR or MONO)
7. Password
8. Caller's record number
9. Number of minutes caller has been on
10. Time caller entered the door
11. Time caller logged on to the BBS
12. Message areas caller can access (ex. ABCDEF...)
13. Number of files downloaded today
14. Number of downloads allowed per day
15. Number of download Kilobytes allowed this call
16. number of download Kilobytes allowed per day
17. Home phone number
18. Date and time of last call (ex. 01/01/80 07:10)
19. Caller's default Help level (NOVICE or EXPERT)
20. Default protocol
21. Date of last NEW files search
22. Total time logged on
23. Page length
24. Number of last message read
25. Total number of uploads
26. Total number of downloads
27. Databits (7 or 8)
28. REMOTE or LOCAL
29. Comport (1 or 2)
30. Caller's birthdate
INSTA-DOOR v1.0 APPENDIX B - DOOR FILE FORMATS 32
CHAIN.TXT
---------
1. User number
2. User alias
3. User real name
4. User callsign (HAM radio)
5. User age
6. User sex
7. User gold
8. User last logon date
9. User columns
10. User width
11. User security level (0-255)
12. 1 if Co-SysOp, 0 if not
13. 1 if SysOp, 0 if not
14. 1 if ANSI, 0 if not
15. 1 if at remote, 0 if local console
16. User number of seconds left till logoff
17. System GFILES directory (gen. txt files)
18. System DATA directory
19. System log of the day
20. User baud rate
21. System com port
22. System name
23. System SysOp
24. Time user logged on/# of secs. from midn.
25. User number of seconds on system so far
26. User number of uploaded k
27. User number of uploads
28. User amount of downloaded k
29. User number of downloads
30. User parity
INSTA-DOOR v1.0 APPENDIX B - DOOR FILE FORMATS 33
PCBOARD.SYS
-----------
1. Sysop's Display ON/OFF
2. Sysop's Printer ON/OFF
3. Sysop's Page Bell ON/OFF
4. Caller Alarm ON/OFF
5. Sysop "Next On" Flag
6. Error Correcting Modem YES/NO
7. Graphics Mode of Caller (7 for MONO - 7 bits, N for
MONO - 8 bits, Y for COLOR - 8 bits)
8. Available for Node Chat YES/NO
9. Baud Rate to Open Modem at
10. "CONNECT" Baud Rate of Caller
11. User's Database Record Number
12. First Name of Caller
13. Password of Caller
14. Time User Logged On
15. Time Used Today
16. Time User Logged On (HH:MM:SS)
17. Daily Time Limit
18. Daily Download Limit
19. Conference (Area) User Exited From
20. Areas User Has "Joined" Today
21. Areas User Has Scanned for New Mail
22. Area "Bonus" Time
23. Upload Time Credit
24. Language Version Being Used
25. Full Name of Caller (First & Last)
26. Session Time Remaining(MKI$ minutes)
27. BBS Node Number That Caller is Using
28. Scheduled EVENT Time (HH:MM)
29. Is EVENT Time Active?
30. Delay EVENT Until User Logs Off?
31. "Memorized" Message Number
32. Com Port Number (0, 1, 2, 0 = LOCAL)
INSTA-DOOR v1.0 APPENDIX C - SPLIT SCREEN CHAT AND ... 34
APPENDIX C - SPLIT SCREEN CHAT AND STATUS BAR
Split Screen Chat has been incorporated into the
INSTA-DOOR library, and is automatically incorporated into
all DOOR programs. Split Screen Chat is activated by the
SYSOP, who presses F10. The screen then divides into two
windows, one for the LOCAL USER (SYSOP) to chat in, and
one for the REMOTE USER. Pressing CTRL-G will send a BEEP
tone to alert the other user. Pressing CTRL-C will clear
the half of the screen the person is using. After chatting
is done, the LOCAL USER (SYSOP) presses ESC to return to
normal DOOR operation.
The Status Bar appears on the bottom two lines of ALL
DOOR programs, and shows the current statistics for the
user of the door. The stats displayed are:
-Name of User
-Residence of User
-TL: Time Left
-SL: Security Level
-NN: Node Number
-BR: Baud Rate
The Time Left and the Security Level can be changed LOCALLY
by pressing CTRL [UP ARROW] and CTRL [DOWN ARROW] for
the Time Left, and CTRL [LEFT ARROW] and CTRL [RIGHT ARROW]
for the security level.
Also, FUNCTION KEY ASSIGNMENTS as shown:
F7 = Exit to BBS
F8 = DOS Shell
F9 = Hangup
F10 = Split Screen Chat